/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package create_view_modify;

import cse308.entities.Assignment;
import cse308.entities.Courseoffering;
import cse308.entities.CourseofferingPK;
import cse308.entities.Courseoutcomedirectassessment;
import cse308.entities.Courseoutcomesurveyresults;
import cse308.GUIUtilityClass;
import cse308.UserSessionBean;
import cse308.entities.Altcoursecoordinators;
import cse308.entities.Courseinfo;
import cse308.entities.Degreeprogram;
import cse308.entities.Users;
import cse308.helper_classes.CourseofferingClass;
import cse308.helper_classes.GeneralTest;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.persistence.Query;
import javax.servlet.http.Part;
import org.omnifaces.util.Faces;

/**
 *
 * @author Aaron
 */
@ManagedBean(name = "courseofferingBean")
@SessionScoped
public class CourseofferingBean implements Serializable {

    @ManagedProperty(value = "#{gUIUtilityClass}")
    private GUIUtilityClass utilities;
    @ManagedProperty(value = "#{userSessionBean}")
    private UserSessionBean userSessionBean;
    private List<CourseofferingClass> courseofferingClasses = (List<CourseofferingClass>) new ArrayList();
    private final static Logger LOG = Logger.getLogger(GUIUtilityClass.class.getName());
    private String course;
    private int section;
    private String semester;
    private String instructor;
    private String courseOutcomeAttinmentTarget;
    private Part schedule;
    private Part syllabus;
    private Part lectureNotes;
    private List<Assignment> allAssignments = new ArrayList();
    private List<String> assignments;
    private List<Courseoutcomedirectassessment> allCourseOutcomeDirectAssessments = new ArrayList();
    private List<String> courseOutcomeDirectAssessments;
    private List<Courseoutcomesurveyresults> allCourseOutcomeSurveyResults = new ArrayList();
    private List<String> courseOutcomeSurveyResults;
    private Part endOfSemesterReport;
    private Part courseCoordinatorReport;
    private Part CICReport;

    public CourseofferingBean() {
    }

    public UserSessionBean getUserSessionBean() {
        return userSessionBean;
    }

    public void setUserSessionBean(UserSessionBean userSessionBean) {
        this.userSessionBean = userSessionBean;
    }

    public List<CourseofferingClass> getCourseofferingClasses() {
        return courseofferingClasses;
    }

    public void setCourseofferingClasses(List<CourseofferingClass> courseofferingClasses) {
        this.courseofferingClasses = courseofferingClasses;
    }

    public String viewCourseOffering() {
        this.courseofferingClasses = new ArrayList();
        LOG.info("viewcourseoffering");
        if (userSessionBean.isCicmember() || userSessionBean.isEvaluator()) {
            EntityManagerFactory emf = Persistence.createEntityManagerFactory("CSE_308_ABETPU");
            EntityManager em = emf.createEntityManager();
            Query studentOutcomesQuery = em.createNamedQuery("Courseoffering.findAll");
            List<Courseoffering> soResultList = (List<Courseoffering>) studentOutcomesQuery.getResultList();
            int i = 0;
            /*   for (Courseoffering co : soResultList) {
             for(Degreeprogram j : co.getCourseinfo().getDegreeprogramCollection()){
             for (Users k : j.getUsersCollection()) {
             if(k.getUsername().equalsIgnoreCase(userSessionBean.getUsername())){
             CourseofferingClass coc = new CourseofferingClass(co);
             this.courseofferingClasses.add(coc);
             // coc.setAssignmentsWithQuery(em);
             // coc.setCourseOutcomeDirectAssessmentsWithQuery(em);
             // coc.setCourseOutcomeSurveyResults(em);
             i++;
             }
             }
             }
             }*/
            for (Courseoffering co : soResultList) {
                List<String> path = new ArrayList();
                path.add(Courseinfo.class.getSimpleName());
                path.add(Degreeprogram.class.getSimpleName());
                path.add(Users.class.getSimpleName());
                if (GUIUtilityClass.isUserRole(path, 0, co)) {
                    CourseofferingClass coc = new CourseofferingClass(co);
                    this.courseofferingClasses.add(coc);
                }
            }
            LOG.info("Shows all Course Offerings from DB");
        }

        EntityManagerFactory emf = Persistence.createEntityManagerFactory("CSE_308_ABETPU");
        EntityManager em = emf.createEntityManager();
        Query studentOutcomesQuery = em.createNamedQuery("Courseoffering.findAll");
        List<Courseoffering> soResultList = (List<Courseoffering>) studentOutcomesQuery.getResultList();
        int i = 0;
        for (Courseoffering co : soResultList) {
            boolean found = false;
            CourseofferingClass coc = new CourseofferingClass(co);
            if (coc.getInstructor().equalsIgnoreCase(userSessionBean.getUsername())) {
                if (!(courseofferingClasses.isEmpty())) {
                    for (CourseofferingClass coc3 : courseofferingClasses) {
                        if ((coc3.getCourse().equalsIgnoreCase(coc.getCourse()) && coc3.getSemester().equalsIgnoreCase(coc.getSemester()) && coc3.getSection() == coc.getSection())) {
                            found = true;
                            break;
                        }
                    }
                } else {
                    courseofferingClasses.add(coc);
                    continue;
                }
                if (!found) {
                    courseofferingClasses.add(coc);
                }
            }
            // coc.setAssignmentsWithQuery(em);
            // coc.setCourseOutcomeDirectAssessmentsWithQuery(em);
            // coc.setCourseOutcomeSurveyResults(em);
            i++;
        }
        i = 0;
        for (Courseoffering co : soResultList) {
            boolean found = false;
            CourseofferingClass coc = new CourseofferingClass(co);
            if (co.getCourseinfo().getCoursecoordinator() != null && co.getCourseinfo().getCoursecoordinator().equalsIgnoreCase(userSessionBean.getUsername())) {
                if (!(courseofferingClasses.isEmpty())) {
                    for (CourseofferingClass coc3 : courseofferingClasses) {
                        if ((coc3.getCourse().equalsIgnoreCase(coc.getCourse()) && coc3.getSemester().equalsIgnoreCase(coc.getSemester()) && coc3.getSection() == coc.getSection())) {
                            found = true;
                            break;
                        }
                    }
                } else {
                    courseofferingClasses.add(coc);
                    continue;
                }
                if (!found) {
                    courseofferingClasses.add(coc);
                }
            }
        }
        for (Courseoffering co : soResultList) {
            boolean found = false;
            CourseofferingClass coc = new CourseofferingClass(co);
            for (Altcoursecoordinators acc : co.getCourseinfo().getAltcoursecoordinatorsCollection()) {
                if (acc.getAltcoursecoordinatorsPK().getAltcoordinator().equalsIgnoreCase(userSessionBean.getUsername())) {
                    if (!(courseofferingClasses.isEmpty())) {
                        for (CourseofferingClass coc3 : courseofferingClasses) {
                            if ((coc3.getCourse().equalsIgnoreCase(coc.getCourse()) && coc3.getSemester().equalsIgnoreCase(coc.getSemester()) && coc3.getSection() == coc.getSection())) {
                                found = true;
                                break;
                            }
                        }
                    } else {
                        courseofferingClasses.add(coc);
                        continue;
                    }
                    if (!found) {
                        courseofferingClasses.add(coc);
                    }
                }
            }
        }
        LOG.info("Shows all Course Offerings from DB");
        return "ViewCourseOffering";
    }

    public void getSyllabus(ActionEvent ae) {
        try {
            Integer rowIndex = (Integer) ae.getComponent().getNamingContainer().getAttributes().get("rowIndex");
            File toSend = this.courseofferingClasses.get(rowIndex).getSyllabusFile();
            if (toSend != null) {
                Faces.sendFile(toSend, true);
            }
        } catch (IOException ex) {
            Logger.getLogger(GUIUtilityClass.class.getName()).log(Level.SEVERE, null, ex);
        }
        LOG.info("Downloads selected Syllabus");
    }

    public void getSchedule(ActionEvent ae) {
        try {
            Integer rowIndex = (Integer) ae.getComponent().getNamingContainer().getAttributes().get("rowIndex");
            LOG.info(rowIndex.toString());
            File toSend = this.courseofferingClasses.get(rowIndex).getScheduleOfLecturesFile();
            if (toSend == null) {
                return;
            }
            Faces.sendFile(toSend, true);
        } catch (IOException ex) {
            Logger.getLogger(GUIUtilityClass.class.getName()).log(Level.SEVERE, null, ex);
        }
        LOG.info("Downloads selected Schedule");
    }

    public void getLectureNotes(ActionEvent ae) {
        try {
            Integer rowIndex = (Integer) ae.getComponent().getNamingContainer().getAttributes().get("rowIndex");
            LOG.info(rowIndex.toString());
            File toSend = this.courseofferingClasses.get(rowIndex).getLectureNotesFile();
            if (toSend == null) {
                return;
            }
            Faces.sendFile(toSend, true);
        } catch (IOException ex) {
            Logger.getLogger(GUIUtilityClass.class.getName()).log(Level.SEVERE, null, ex);
        }
        LOG.info("Downloads selected LectureNotes");
    }

    public void getEndOfSemesterReport(ActionEvent ae) {
        try {
            Integer rowIndex = (Integer) ae.getComponent().getNamingContainer().getAttributes().get("rowIndex");
            LOG.info(rowIndex.toString());
            File toSend = this.courseofferingClasses.get(rowIndex).getEndOfSemesterReportFile();
            if (toSend == null) {
                return;
            }
            Faces.sendFile(toSend, true);
        } catch (IOException ex) {
            Logger.getLogger(GUIUtilityClass.class.getName()).log(Level.SEVERE, null, ex);
        }
        LOG.info("Downloads selected EndofSemesterReport");
    }

    public void getCourseCoordinatorReport(ActionEvent ae) {
        try {
            Integer rowIndex = (Integer) ae.getComponent().getNamingContainer().getAttributes().get("rowIndex");
            LOG.info(rowIndex.toString());
            File toSend = this.courseofferingClasses.get(rowIndex).getCourseCoordinatorReportFile();
            if (toSend == null) {
                return;
            }
            Faces.sendFile(toSend, true);
        } catch (IOException ex) {
            Logger.getLogger(GUIUtilityClass.class.getName()).log(Level.SEVERE, null, ex);
        }
        LOG.info("Downloads selected CourseCoordinatorReport");
    }

    public void getCICReport(ActionEvent ae) {
        try {
            Integer rowIndex = (Integer) ae.getComponent().getNamingContainer().getAttributes().get("rowIndex");
            LOG.info(rowIndex.toString());
            File toSend = this.courseofferingClasses.get(rowIndex).getCICReportFile();
            if (toSend == null) {
                return;
            }
            Faces.sendFile(toSend, true);
        } catch (IOException ex) {
            Logger.getLogger(GUIUtilityClass.class.getName()).log(Level.SEVERE, null, ex);
        }
        LOG.info("Downloads selected CICReport");
    }

    public String createCourseOffering() {
        LOG.info("in cco");
        //this.assignments= new ArrayList();
        //this.courseOutcomeDirectAssessments = new ArrayList();
        //this.courseOutcomeSurveyResults = new ArrayList();
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("CSE_308_ABETPU");
        EntityManager em = emf.createEntityManager();

        em.getTransaction().begin();

        Courseoffering co = new Courseoffering();
        co.setCICReport(GUIUtilityClass.convertToBytesByPart(this.CICReport));
        co.setCourseCoordinatorReport(GUIUtilityClass.convertToBytesByPart(courseCoordinatorReport));
        co.setCourseOutcomeAttainmentTarget(courseOutcomeAttinmentTarget);
        co.setEndOfSemesterReport(GUIUtilityClass.convertToBytesByPart(endOfSemesterReport));
        co.setInstructor(instructor);
        co.setLectureNotes(GUIUtilityClass.convertToBytesByPart(lectureNotes));
        co.setSchedule(GUIUtilityClass.convertToBytesByPart(schedule));
        co.setSyllabus(GUIUtilityClass.convertToBytesByPart(syllabus));
        CourseofferingPK copk = new CourseofferingPK();
        copk.setCourse(course);
        copk.setSection(section);
        copk.setSemester(semester);
        co.setCourseofferingPK(copk);
        if (utilities.checkPK(co)) {
            FacesMessage message = new FacesMessage();
            message.setDetail(GUIUtilityClass.createWarning);
            FacesContext.getCurrentInstance().addMessage("form", message);
            return "";
        }

        if (this.course != null) {
            Courseinfo currentCourse = em.find(Courseinfo.class, this.course);

            if (currentCourse == null) {
                FacesMessage message = new FacesMessage();
                message.setDetail("Course does not exist. Choose an existing course.");
                FacesContext.getCurrentInstance().addMessage("form", message);
                return "";
            }

            co.setCourseinfo(currentCourse);
            currentCourse.getCourseofferingCollection().add(co);
            em.merge(currentCourse);
        }

        for (String s : this.assignments) {
            Assignment as = em.find(Assignment.class, s);
            if (as != null) {
                as.setCourseoffering(co);
                co.getAssignmentCollection().add(as);
                // List<Assignment> currentAssign = em.createNamedQuery("Assignment.findByName").setParameter("name", s).getResultList();
                // Assignment currentAssignment = currentAssign.get(0);
                // currentAssignment.setCourseoffering(co);
                // co.getAssignmentCollection().add(currentAssignment);
                em.persist(em.merge(as));
            }
        }
        for (String s : this.courseOutcomeDirectAssessments) {
            Courseoutcomedirectassessment coda = em.find(Courseoutcomedirectassessment.class, s);
            if (coda != null) {
                coda.setCourseoffering(co);
                co.getCourseoutcomedirectassessmentCollection().add(coda);
                em.persist(em.merge(coda));
            }
            // List<Courseoutcomedirectassessment> currentAssign = em.createNamedQuery("Courseoutcomedirectassessment.findByCourseOutcome").setParameter("courseOutcome", s).getResultList();
            // Courseoutcomedirectassessment currentAssignment = currentAssign.get(0);
            // currentAssignment.setCourseoffering(co);
            //co.getCourseoutcomedirectassessmentCollection().add(currentAssignment);

        }
        for (String s : this.courseOutcomeSurveyResults) {
            Courseoutcomesurveyresults cosr = em.find(Courseoutcomesurveyresults.class, Integer.valueOf(s));
            if (cosr != null) {
                cosr.setCourseoffering(co);
                co.getCourseoutcomesurveyresultsCollection().add(cosr);
                em.persist(em.merge(cosr));
            }
            //List<Courseoutcomesurveyresults> currentAssign = em.createNamedQuery("Courseoutcomesurveyresults.findByUid").setParameter("uid", Integer.valueOf(s)).getResultList();
            //Courseoutcomesurveyresults currentAssignment = currentAssign.get(0);
            //currentAssignment.setCourseoffering(co);
            //co.getCourseoutcomesurveyresultsCollection().add(currentAssignment);
            //em.persist(currentAssignment);
        }
        em.persist(co);
        em.getTransaction().commit();
        return "welcome";

    }

    public String createCourseOfferings() {
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("CSE_308_ABETPU");
        EntityManager em = emf.createEntityManager();
        this.allAssignments = em.createNamedQuery("Assignment.findAll").getResultList();
        this.allCourseOutcomeDirectAssessments = em.createNamedQuery("Courseoutcomedirectassessment.findAll").getResultList();
        this.allCourseOutcomeSurveyResults = em.createNamedQuery("Courseoutcomesurveyresults.findAll").getResultList();
        return "CreateCourseOffering";
    }

    public String modifyCourseOffering() {
        List<String> associatedClasses = new ArrayList();
        /*
         * AssociatedClasses was originally designed to hold the name of the classes
         * that this class had a Foreign Key relationship to. However some tables that
         * a class has a Foreign Key relationship to don't have a "Class" class. For example
         * there isn't an AssignmentClass. The generalizedModify algorithm was changed so that
         * AssociatedClasses could also hold entities. There is already an AssociatedEntities argument
         * thats used for other reasons. As such if all the tables that this class relates to do not
         * have "Class" classes, then AssociatedClasses and AssociatedEntities might end up holding
         * the same names
         */
        associatedClasses.add(Assignment.class.getCanonicalName());
        associatedClasses.add(Courseoutcomedirectassessment.class.getCanonicalName());
        associatedClasses.add(Courseoutcomesurveyresults.class.getCanonicalName());
        List<String> associatedEntities = new ArrayList();
        associatedEntities.add(Assignment.class.getCanonicalName());
        associatedEntities.add(Courseoutcomedirectassessment.class.getCanonicalName());
        associatedEntities.add(Courseoutcomesurveyresults.class.getCanonicalName());
        List<String> ownList = new ArrayList();
        ownList.add("setOwnAssignments");
        ownList.add("setOwnCourseOutcomeDirectAssessments");
        ownList.add("setOwnCourseOutcomeSurveyResults");
        List<String> allList = new ArrayList();
        allList.add("setAllAssignments");
        allList.add("setAllCourseOutcomeDirectAssessments");
        allList.add("setAllCourseOutcomeSurveyResults");
        if (userSessionBean.isCicmember() || userSessionBean.isEvaluator()) {
            try {
                this.courseofferingClasses = (List) utilities.generalizeModify(Courseoffering.class.getCanonicalName(),
                        CourseofferingClass.class.getCanonicalName(), associatedClasses,
                        associatedEntities, ownList, allList);
            } catch (ClassNotFoundException | NoSuchMethodException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                Logger.getLogger(CourseofferingBean.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        /*if (!(userSessionBean.isCicmember() || userSessionBean.isEvaluator())) {
         for (CourseofferingClass coc : courseofferingClasses) {
         Courseoffering coEntity = (Courseoffering)coc.findCorrespondingEntity();
         if ((coc.getInstructor() != null && !(coc.getInstructor().equalsIgnoreCase(userSessionBean.getUsername()))) && (coEntity.getCourseCoordinator() != null && !(coEntity.getCourseCoordinator().equalsIgnoreCase(userSessionBean.getUsername())))){
         for(Altcoursecoordinators acc : coEntity.getCourseinfo().getAltcoursecoordinatorsCollection()){
         if(!(acc.getAltcoursecoordinatorsPK().getAltcoordinator().equalsIgnoreCase(userSessionBean.getUsername()))){
         courseofferingClasses.remove(coc);
         }
         }
         }
         }
         }*/
        List<CourseofferingClass> coc2 = new ArrayList();
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("CSE_308_ABETPU");
        EntityManager em = emf.createEntityManager();
        Query courseofferingsQuery = em.createNamedQuery("Courseoffering.findAll");
        List<Courseoffering> soResultList = (List<Courseoffering>) courseofferingsQuery.getResultList();
        for (Courseoffering coc : soResultList) {
            CourseofferingClass coc3 = new CourseofferingClass(coc);
            Courseoffering co = (Courseoffering) coc3.findCorrespondingEntity();
            if ((coc.getInstructor() != null && coc.getInstructor().equalsIgnoreCase(userSessionBean.getUsername()))) {
                coc3.setIsInstructor(true);
            }
            if ((co.getCourseinfo().getCoursecoordinator() != null && co.getCourseinfo().getCoursecoordinator().equalsIgnoreCase(userSessionBean.getUsername()))) {
                coc3.setIsCourseCoordinator(true);
            }
            for (Altcoursecoordinators acc : co.getCourseinfo().getAltcoursecoordinatorsCollection()) {
                if (acc.getAltcoursecoordinatorsPK().getAltcoordinator().equalsIgnoreCase(userSessionBean.getUsername())) {
                    coc3.setIsAltCoursecoordinator(true);
                }
            }
            if (coc3.isIsInstructor() || coc3.isIsCourseCoordinator() || coc3.isIsAltCoursecoordinator()) {
                coc2.add(coc3);
            }
        }
        for (CourseofferingClass coc : coc2) {
            boolean found = false;
            if (!(courseofferingClasses.isEmpty())) {
                for (CourseofferingClass coc3 : courseofferingClasses) {
                    if ((coc3.getCourse().equalsIgnoreCase(coc.getCourse()) && coc3.getSemester().equalsIgnoreCase(coc.getSemester()) && coc3.getSection() == coc.getSection())) {
                        found = true;
                    }
                }
                if (!found) {
                    courseofferingClasses.add(coc);
                }
            } else {
                courseofferingClasses.add(coc);
            }
        }
        return "ModifyCourseOffering";
    }

    public String saveCourseOffering() {
        List<GeneralTest> gt = new ArrayList();
        for (int i = 0; i < this.courseofferingClasses.size(); i++) {
            gt.add(this.courseofferingClasses.get(i));
        }
        List<String> associatedEntities = new ArrayList();
        associatedEntities.add(Assignment.class.getSimpleName());
        associatedEntities.add(Courseoutcomedirectassessment.class.getSimpleName());
        associatedEntities.add(Courseoutcomesurveyresults.class.getSimpleName());


        if (utilities.checkOneToMany(gt, -1)) {
            FacesMessage message = new FacesMessage();
            message.setDetail("For Assignment, Course outcome direct assessment, and course outcome survey results, you can only associate an item with one Course Offering");
            FacesContext.getCurrentInstance().addMessage("form", message);
            return "";
        }

        try {
            boolean success = utilities.generalizedSave(Courseoffering.class.getCanonicalName(),
                    gt, associatedEntities);
            if (!success) {
                FacesMessage message = new FacesMessage();
                message.setDetail(GUIUtilityClass.duplicateWarning);
                FacesContext.getCurrentInstance().addMessage("form", message);
            }
        } catch (SecurityException | NoSuchFieldException | IllegalArgumentException | IllegalAccessException | NoSuchMethodException | InvocationTargetException | ClassNotFoundException | InstantiationException ex) {
            Logger.getLogger(CourseofferingBean.class.getName()).log(Level.SEVERE, null, ex);
        }
        return "ModifyCourseOffering";
    }

    public int getSection() {
        return section;
    }

    public void setSection(int section) {
        this.section = section;
    }

    public String getSemester() {
        return semester;
    }

    public void setSemester(String semester) {
        this.semester = semester;
    }

    public String getInstructor() {
        return instructor;
    }

    public void setInstructor(String instructor) {
        this.instructor = instructor;
    }

    public Part getSyllabus() {
        return syllabus;
    }

    public void setSyllabus(Part syllabus) {
        LOG.info("in set syllabus");
        this.syllabus = syllabus;
    }

    public Part getLectureNotes() {
        return lectureNotes;
    }

    public void setLectureNotes(Part lectureNotes) {
        this.lectureNotes = lectureNotes;
    }

    public List<String> getAssignments() {
        return assignments;
    }

    public void setAssignments(List<String> assignments) {
        this.assignments = assignments;
    }

    public String getCourseOutcomeAttinmentTarget() {
        return courseOutcomeAttinmentTarget;
    }

    public void setCourseOutcomeAttinmentTarget(String courseOutcomeAttinmentTarget) {
        this.courseOutcomeAttinmentTarget = courseOutcomeAttinmentTarget;
    }

    public List<String> getCourseOutcomeDirectAssessments() {
        return courseOutcomeDirectAssessments;
    }

    public void setCourseOutcomeDirectAssessments(List<String> courseOutcomeDirectAssessments) {
        this.courseOutcomeDirectAssessments = courseOutcomeDirectAssessments;
    }

    public List<String> getCourseOutcomeSurveyResults() {
        return courseOutcomeSurveyResults;
    }

    public void setCourseOutcomeSurveyResults(List<String> courseOutcomeSurveyResults) {
        this.courseOutcomeSurveyResults = courseOutcomeSurveyResults;
    }

    public Part getEndOfSemesterReport() {
        return endOfSemesterReport;
    }

    public void setEndOfSemesterReport(Part endOfSemesterReport) {
        this.endOfSemesterReport = endOfSemesterReport;
    }

    public Part getCourseCoordinatorReport() {
        return courseCoordinatorReport;
    }

    public void setCourseCoordinatorReport(Part courseCoordinatorReport) {
        this.courseCoordinatorReport = courseCoordinatorReport;
    }

    public Part getCICReport() {
        return CICReport;
    }

    public void setCICReport(Part CICReport) {
        this.CICReport = CICReport;
    }

    public List<Assignment> getAllAssignments() {
        return allAssignments;
    }

    public void setAllAssignments(List<Assignment> allAssignments) {
        this.allAssignments = allAssignments;
    }

    public List<Courseoutcomedirectassessment> getAllCourseOutcomeDirectAssessments() {
        return allCourseOutcomeDirectAssessments;
    }

    public void setAllCourseOutcomeDirectAssessments(List<Courseoutcomedirectassessment> allCourseOutcomeDirectAssessments) {
        this.allCourseOutcomeDirectAssessments = allCourseOutcomeDirectAssessments;
    }

    public List<Courseoutcomesurveyresults> getAllCourseOutcomeSurveyResults() {
        return allCourseOutcomeSurveyResults;
    }

    public void setAllCourseOutcomeSurveyResults(List<Courseoutcomesurveyresults> allCourseOutcomeSurveyResults) {
        this.allCourseOutcomeSurveyResults = allCourseOutcomeSurveyResults;
    }

    public String getCourse() {
        return course;
    }

    public void setCourse(String course) {
        this.course = course;
    }

    public Part getSchedule() {
        return schedule;
    }

    public void setSchedule(Part schedule) {
        this.schedule = schedule;
    }

    public static Logger getLOG() {
        return LOG;
    }

    public GUIUtilityClass getUtilities() {
        return utilities;
    }

    public void setUtilities(GUIUtilityClass utilities) {
        this.utilities = utilities;
    }
}
